]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspaceSwitcherPopup: Set offscreen redirect always
authorDaniel van Vugt <daniel.van.vugt@canonical.com>
Wed, 8 Jul 2020 10:06:39 +0000 (18:06 +0800)
committerDaniel van Vugt <daniel.van.vugt@canonical.com>
Thu, 9 Jul 2020 03:49:59 +0000 (11:49 +0800)
Because for most frames during a workspace switch it's not changing and
we can repaint it faster if it's cached on the GPU as a single texture.

This seems to reduce the render time for workspace switching by more
than 20%.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1356

js/ui/workspaceSwitcherPopup.js

index eebf9db3b73a0da97dc8d38afe4ae315079a7d07..4613e96ecfe63460e34eb42edbb160f4d93c1ac2 100644 (file)
@@ -11,7 +11,10 @@ var DISPLAY_TIMEOUT = 600;
 var WorkspaceSwitcherPopupList = GObject.registerClass(
 class WorkspaceSwitcherPopupList extends St.Widget {
     _init() {
-        super._init({ style_class: 'workspace-switcher' });
+        super._init({
+            style_class: 'workspace-switcher',
+            offscreen_redirect: Clutter.OffscreenRedirect.ALWAYS,
+        });
 
         this._itemSpacing = 0;
         this._childHeight = 0;